import { BizVendorLedgerVo } from '@/api/vendor/ledger/types';
import { VxeGridProps } from 'vxe-table';

export function getTableConfig(): VxeGridProps<BizVendorLedgerVo> {
  return {
    id: 'tenant',
    loading: false,

    border: 'inner',
    height: 'auto',
    autoResize: true,
    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { title: '序号', type: 'seq', width: 50 },
      { sortable: true, field: 'vendorName', title: '酒店名称', minWidth: 150 },
      { sortable: false, field: 'regionName', minWidth: 200, title: '区域' },
      { sortable: false, field: 'vendorContactor', minWidth: 80, title: '联系人' },
      { sortable: false, field: 'vendorContactorPhone', minWidth: 100, title: '联系电话' },
      { sortable: false, field: 'oxiBagNum', minWidth: 100, title: '氧气袋总数' },
      { sortable: false, field: 'unsettleBagNum', minWidth: 100, title: '未结算数量' },
      { sortable: true, field: 'lastSettleTime', minWidth: 130, title: '上次结算时间' },
      { sortable: true, field: 'lastHandoverTime', minWidth: 130, title: '上次交接时间' },
      { sortable: true, field: 'lastHandoverPerson', minWidth: 80, title: '交接人' },
      { sortable: true, field: 'uncheckTotalNum', minWidth: 130, title: '待确认物资总数' },
      { sortable: false, field: 'lastShippingPerson', minWidth: 80, title: '发货人' },
      { sortable: true, field: 'lastShippingTime', minWidth: 130, title: '发货时间' },
      { sortable: false, field: 'handle', fixed: 'right', title: '操作', width: '140px', slots: { default: 'handle' } }
    ],
    data: [] as BizVendorLedgerVo[]
  };
}
